package com.atguigu.gmall.cart.client;

import com.atguigu.gmall.model.cart.CartInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * @author gsy
 * @date 2021年09月07日20:59
 * Description
 */
@FeignClient("service-cart")
public interface CartInfoFeignClient {


    @PostMapping("/api/cart/addCart/{skuId}/{skuNum}")
    void addCart(@PathVariable Long skuId, @PathVariable Integer skuNum);

    @GetMapping("/api/cart/findCartInfo/{skuId}")
    CartInfo findCartInfo(@PathVariable Long skuId);

    //查询购物车选中的商品清单
    @GetMapping("/api/cart/getCartCheckedList/{userId}")
    List<CartInfo> getCartCheckedList(@PathVariable String userId);
}
